var aFruit=document.getElementsByClassName("list_check");
$('#idsCopy').click(function(){
    var str="";
    for(var i=0;i<aFruit.length;i++) {
        if (aFruit[i].checked) {
            str = str + aFruit[i].value + ",";
        }else{
            str = str + "";
        }
    }
    str=(str.substring(str.length-1)==',')?str.substring(0,str.length-1):str;
    $('#pathId').val(str);
});

var clipboard = new Clipboard('#idsCopy', {
    text: function() {
        return $("#pathId").val();
    }
});
clipboard.on('success', function(e) {
    art.dialog({
        title:'包含',
        content:  '复制成功'
    });
});
clipboard.on('error', function (e) {
});